package knowall.server;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")
public class Question {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	String id;
	@Persistent
	List<String> questionParts = new ArrayList<String>();
	@Persistent
	List<String> nodeIds = new ArrayList<String>();
	@Persistent
	Set<String> contextIds = new HashSet<String>();
	@Persistent
	List<String> referenceNames = new ArrayList<String>();
	@Persistent
	List<String> referenceURLs = new ArrayList<String>();
	@Persistent
	String correctAnswerId;
	@Persistent
	List<String> incorrectAnswerIds = new ArrayList<String>();
	@Persistent
	Float yieldAvg;
	@Persistent
	Float difficultyAvg;
	@Persistent
	Float qualityAvg;
	@Persistent
	Integer yieldNum;
	@Persistent
	Integer difficultyNum;
	@Persistent
	Integer qualityNum;
	
	public Question() { 
		
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public List<String> getQuestionParts() {
		return questionParts;
	}

	public void setQuestionParts(List<String> questionParts) {
		this.questionParts = questionParts;
	} 

	public List<String> getNodeIds() {
		return nodeIds;
	}

	public void setNodeIds(List<String> nodeIds) {
		this.nodeIds = nodeIds;
	}

	public List<String> getReferenceNames() {
		return referenceNames;
	}

	public void setReferenceNames(List<String> referenceNames) {
		this.referenceNames = referenceNames;
	}

	public List<String> getReferenceURLs() {
		return referenceURLs;
	}

	public void setReferenceURLs(List<String> referenceURLs) {
		this.referenceURLs = referenceURLs;
	}

	public String getCorrectAnswerId() {
		return correctAnswerId;
	}

	public void setCorrectAnswerId(String correctAnswerId) {
		this.correctAnswerId = correctAnswerId;
	}

	public List<String> getIncorrectAnswerIds() {
		return incorrectAnswerIds;
	}

	public void setIncorrectAnswerIds(List<String> incorrectAnswerIds) {
		this.incorrectAnswerIds = incorrectAnswerIds;
	}

	public Set<String> getContextIds() {
		return contextIds;
	}

	public void setContextIds(Set<String> contextIds) {
		this.contextIds = contextIds;
	}

	public Float getYieldAvg() {
		return yieldAvg;
	}

	public void setYieldAvg(Float yieldAvg) {
		this.yieldAvg = yieldAvg;
	}

	public Float getDifficultyAvg() {
		return difficultyAvg;
	}

	public void setDifficultyAvg(Float difficultyAvg) {
		this.difficultyAvg = difficultyAvg;
	}

	public Float getQualityAvg() {
		return qualityAvg;
	}

	public void setQualityAvg(Float qualityAvg) {
		this.qualityAvg = qualityAvg;
	}

	public Integer getYieldNum() {
		return yieldNum;
	}

	public void setYieldNum(Integer yieldNum) {
		this.yieldNum = yieldNum;
	}

	public Integer getDifficultyNum() {
		return difficultyNum;
	}

	public void setDifficultyNum(Integer difficultyNum) {
		this.difficultyNum = difficultyNum;
	}

	public Integer getQualityNum() {
		return qualityNum;
	}

	public void setQualityNum(Integer qualityNum) {
		this.qualityNum = qualityNum;
	}
	
}
